local sknvim_stupid_mode_selector =
    require('sknvim.util').stupid_mode_data_selector

local M = {}

M.my_colors = require('my_colors').lualine_colors
M.sections = sknvim_stupid_mode_selector({
    lualine_a = {'mode', 'searchcount'},
    lualine_b = {'branch', 'diff', 'filename', 'diagnostics'},
    lualine_c = {'hostname'},
    lualine_x = {'encoding', 'fileformat', 'filetype'},
    lualine_y = {'progress'},
    lualine_z = {'location'}
},
{
    lualine_a = {'mode'},
    lualine_b = {'filename', 'diagnostics'},
    lualine_c = {},
    lualine_x = {'encoding', 'fileformat', 'filetype'},
    lualine_y = {'progress'},
    lualine_z = {'location'}
})

function M:set_variables()
    vim.opt.showmode = false
end

M.config = {
    options = {
        icons_enabled = false,
        theme = M.my_colors,
        component_separators = { left = '', right = '' },
        section_separators = { left = '', right = '' },
    },
    sections = M.sections,
    tabline = {
        lualine_a = {'filename'},
        lualine_b = {},
        lualine_c = {},
        lualine_x = {},
        lualine_y = {'buffers'},
        lualine_z = {'tabs'}
    }
}

M:set_variables()

M.lazy_def = {
    "https://github.com/nvim-lualine/lualine.nvim",
    lazy = false,
    opts = M.config,
    keys = require("sknvim.keybinds").buffer
}

return M
